package org.NooLab.glue.instances;

public class ParticipantsSettings {

	boolean instanceIsUnique = true;
	boolean activeReceiptsExchange = true;
	String instanceName = "";
	String defaultDocType = "*";
	int alignmentGroupSize = -1;
	
	long preferredID = -1;
	String preferredUID = "" ;
	
	boolean collectResults=false;
	
	int numberOfConnectRetry = 3 ;
	int delayBetweenConnectRetries = 3000 ;
	double delayProgressionFactor = 1.2 ;
	int maxPeriodLengthBetweenReconnects = 1000*60*60*3 ; // = 3h  
	
	boolean keepRegistrationAlive = true;
	
	/**    */
	boolean generalTaskRelayFlag = true ;
	/** -1=no limit; 0=no relay, overrules the general flag "generalTaskRelayFlag"; 1+ = count of hops */
	int taskRelayHopsLimit = -1 ; // 
	
	public ParticipantsSettings(){
		
	}
	
	/**
	 * this could be anything..., could be set separated by commas;<br/> 
	 * there must be just a receptor defining are least one matching label in its own set<br/><br/>
	 * 
	 * @param doctype a comma-separated list of labels
	 */
	public void setDefaultDocType( String doctype ){
		defaultDocType = doctype;
	}
	
	public void setResultAlignment( int alignmentgroupsize ){
		alignmentGroupSize = alignmentgroupsize;
	}
	
		
	
	public String getDefaultDocType() {
		return defaultDocType;
	}

	public int getAlignmentGroupSize() {
		return alignmentGroupSize;
	}

	public void setAlignmentGroupSize(int alignmentGroupSize) {
		this.alignmentGroupSize = alignmentGroupSize;
	}

	public long getPreferredID() {
		return preferredID;
	}

	public void setPreferredID(long preferredID) {
		this.preferredID = preferredID;
	}

	public void setPreferredUID( String preferreduid ){
		preferredUID = preferreduid;
	}
	
	public void setInstanceAsUnique( boolean flag){
		instanceIsUnique = flag;
	}
	
	public void setCollectResults( boolean flag){
		collectResults = flag;
	}
	
	public void setActiveReceiptsExchange( boolean flag){
		activeReceiptsExchange = flag;
	}

	public boolean isInstanceIsUnique() {
		return instanceIsUnique;
	}
	public boolean getInstanceIsUnique() {
		return instanceIsUnique;
	}
	public void setInstanceIsUnique(boolean instanceIsUnique) {
		this.instanceIsUnique = instanceIsUnique;
	}

	
	public void setName( String name ){
		instanceName = name ;
	}

	public String getInstanceName() {
		return instanceName;
	}

	public void setInstanceName(String instanceName) {
		this.instanceName = instanceName;
	}

	public int getNumberOfConnectRetry() {
		return numberOfConnectRetry;
	}

	public void setNumberOfConnectRetry(int numberOfConnectRetry) {
		this.numberOfConnectRetry = numberOfConnectRetry;
	}

	public int getDelayBetweenConnectRetries() {
		return delayBetweenConnectRetries;
	}

	public void setDelayBetweenConnectRetries(int delayBetweenConnectRetries) {
		this.delayBetweenConnectRetries = delayBetweenConnectRetries;
	}

	public boolean isKeepRegistrationAlive() {
		return keepRegistrationAlive;
	}

	public void setKeepRegistrationAlive(boolean keepRegistrationAlive) {
		this.keepRegistrationAlive = keepRegistrationAlive;
	}

	public double getDelayProgressionFactor() {
		return delayProgressionFactor;
	}

	public void setDelayProgressionFactor(double delayProgressionFactor) {
		this.delayProgressionFactor = delayProgressionFactor;
	}

	public int getMaxPeriodLengthBetweenReconnects() {
		return maxPeriodLengthBetweenReconnects;
	}

	public void setMaxPeriodLengthBetweenReconnects(
			int maxPeriodLengthBetweenReconnects) {
		this.maxPeriodLengthBetweenReconnects = maxPeriodLengthBetweenReconnects;
	}

	public boolean getGeneralTaskRelayFlag() {
		return generalTaskRelayFlag;
	}
	public boolean isGeneralTaskRelayFlag() {
		return generalTaskRelayFlag;
	}

	public int getTaskRelayHopsLimit() {
		return taskRelayHopsLimit;
	}

	public void setGeneralTaskRelayFlag(boolean generalTaskRelayFlag) {
		this.generalTaskRelayFlag = generalTaskRelayFlag;
	}

	public void setTaskRelayHopsLimit(int taskRelayHopsLimit) {
		this.taskRelayHopsLimit = taskRelayHopsLimit;
	}
	
	
	
	
}
